import request from '../../../utils/request'

export function questionPaginationListApi(page_size, current_page) {
  /**
   * 指定分页信息查询问题信息列表接口
  */
  return request({
    url: '/api/resources/question/?page_size=' + page_size + '&current_page=' + current_page,
    method: 'GET',
  })
}

export function questionSearchPaginationListApi(page_size, current_page, search_data) {
  /**
   * 指定查询内容获取问题信息接口——包含分页信息
  */
  return request({
    url: '/api/resources/question/?page_size=' + page_size + '&current_page=' + current_page + '&search_data=' + search_data,
    method: 'GET',
  })
}

export function questionSearchApi(search_data) {
  /**
   * 指定查询内容获取问题信息接口
  */
  return request({
    url: '/api/resources/question/?search_data=' + search_data,
    method: 'GET',
  })
}

export function questionListApi() {
  /**
   * 问题信息列表接口
  */
  return request({
    url: '/api/resources/question/',
    method: 'GET',
  })
}

export function questionCreateApi(data) {
  /**
   * 问题信息创建接口
  */
  return request({
    url: '/api/resources/question/',
    method: 'POST',
    data: data,
  })
}


export function questionDeleteApi (data) {
  /**
   * 问题信息删除接口
  */
  return request({
    url: '/api/resources/question/' + data['id'] + '/',
    method: 'DELETE',
  })
}

export function questionUpdateApi (data) {
  /**
   * 问题信息更新接口
  */
  return request({
    url: '/api/resources/question/' + data['id'] + '/',
    method: 'PATCH',
    data: data
  })
}

export function questionDetailApi (data) {
  /**
   * 单个问题信息接口
  */
  return request({
    url: '/api/resources/question/' + data['id'] + '/',
    method: 'GET',
  })
}
